package com.xnyzc.lhy.order.service.oss.hystrix;

import com.xnyzc.lhy.common.entity.HeadBash64;
import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.common.exception.PangException;
import com.xnyzc.lhy.common.penum.EErrorCode;
import com.xnyzc.lhy.order.service.oss.IOaOssFileClientService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Description oss文件熔断器
 * @Author zhuyubin
 * @Date 2019/8/16 14:58
 **/
@Slf4j
@Component
public class IOaOssFileClientServiceHystrix implements IOaOssFileClientService {

    @Override
    public Rv getFileUrl(Long fileId) {
        return Rv.wrap("");
    }

    @Override
    public Rv uploadFile(HeadBash64 headBash64) {
        log.error("上传请求失败,未调用到resource服务");
        throw PangException.create(EErrorCode.updateHeadFiled);
    }

}
